package com.freshmarket.freshmarket.controller;


import com.freshmarket.freshmarket.controller.result.BackBatchOperationResult;
import com.freshmarket.freshmarket.service.impl.ProductBatchOperationServiceImpl;
import com.freshmarket.freshmarket.utils.Result;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Squirrel
 * @since 2020-09-05
 */
@RestController
@RequestMapping("/freshmarket/product-batch-operation")
public class ProductBatchOperationController {

    final ProductBatchOperationServiceImpl productBatchOperationService;

    public ProductBatchOperationController(ProductBatchOperationServiceImpl productBatchOperationService) {
        this.productBatchOperationService = productBatchOperationService;
    }

    @RequestMapping("/selectList")
    public Result selectList(int pageIndex){
        List<BackBatchOperationResult> backBatchOperationResults = productBatchOperationService.selectList(pageIndex);
        return Result.successResult(backBatchOperationResults);
    }
}

